package com.waner.reggie.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.waner.reggie.dto.DishDto;
import com.waner.reggie.entity.Dish;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface DishService extends IService<Dish> {
    @Transactional
    public void saveWithFlavors(DishDto dishDto);

    @Transactional
    public Page<DishDto> pageWithCategoryName(int page,int pageSize,String name);

    @Transactional
    public void updateWithFlavors(DishDto dishDto);

    @Transactional
    public DishDto getDishByIdWithFlavor(Long id);

    @Transactional
    public void deleteWithFlavors(List<Long> ids);

    @Transactional
    public List<DishDto> listByCategoryIdWithFlavors(Long categoryId);
}
